<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改短信发送记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-record-edit" th:object="${msgSendRecord}">
            <input name="sendRecordId" th:field="*{sendRecordId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">短信发送流水号：</label>
                <div class="col-sm-8">
                    <input name="msgOrderNo" th:field="*{msgOrderNo}" class="form-control" type="text" readonly="true">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">短信验证码：</label>
                <div class="col-sm-8">
                    <input name="sendRecordVerifyCode" th:field="*{sendRecordVerifyCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">模版类型：</label>
                <div class="col-sm-8">
                    <div class="input-group" style="width: 100%">
                        <select name="sendRecordBusinessType" class="form-control m-b"  th:with="type=${@dict.getType('sms_business_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sendRecordBusinessType}">
                            </option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">联系电话：</label>
                <div class="col-sm-8">
                    <input name="sendRecordPhone" th:field="*{sendRecordPhone}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">模版编码：</label>
                <div class="col-sm-8">
                    <input name="sendRecordTemplateCode" th:field="*{sendRecordTemplateCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">发送数据：</label>
                <div class="col-sm-8">
                    <textarea name="smsTemplateContent" class="form-control" required>[[*{sendRecordTemplateContent}]]</textarea>
                </div>
            </div>\
            <div class="form-group">    
                <label class="col-sm-3 control-label">发送时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="sendRecordTime" th:value="${#dates.format(msgSendRecord.sendRecordTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">发送状态：</label>
                <div class="col-sm-8">
                    <div class="input-group" style="width: 100%">
                        <select name="sendRecordStatus" class="form-control m-b"  th:with="type=${@dict.getType('sms_send_status')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sendRecordStatus}">
                            </option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">响应时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="sendRecordResponseTime" th:value="${#dates.format(msgSendRecord.sendRecordResponseTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注信息：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "message/sendRecord";
        $("#form-record-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-record-edit').serialize());
            }
        }
    </script>
</body>
</html>